<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="created" content="2018-10-23T06:18:10.521000000">
    <meta name="changed" content="2021-07-18T10:59:00.000000000">
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta http-equiv="Content-Language" content="en">
    <title>
      Tunnel
    </title>
    <link rel="stylesheet" type="text/css" href="../../style.css">
  </head>
  <body>
    <div class="maindiv">
      <h1>
        <img class="iconlibs" src="../../../../icons/6464/tunnel.png" alt="#########" width="32" height="32"> 
		<em> Tunnel</em>
      </h1>
      <table>
        <tbody>
          <tr>
            <td>
              <strong>Library:</strong>
            </td>
            <td>
              <a href="index.html">Wiring</a>
            </td>
          </tr>
          <tr>
            <td>
              <strong>Introduced:</strong>
            </td>
            <td>
              2.5.0 (in Base library, moved to Wiring in 2.7.0)
            </td>
          </tr>
          <tr>
            <td valign="top">
              <strong>Appearance:</strong>
            </td>
            <td valign="top">
              <img class="notscal" src="../../../../img-libs/tunnel.png" alt="#########">
            </td>
          </tr>
        </tbody>
      </table>
      <h2>
        Behavior
      </h2>
      <p>
        A <q>tunnel</q> acts like a wire in that it binds points together, but unlike a wire the connection is not explicitly drawn. This is helpful when you need to connect points far apart in the circuit and a network of wires would make the circuit much more ugly. The below illustration illustrates how this works.
      </p>
      <center>
        <img src="../../../../img-libs/tunnel-demo.png" alt="#########">
      </center>
      <p>
        The illustration above shows how this works. Here the three tunnels have the same label, <em>Clk_A</em>, and represents the three points to which the tunnels are connected. If one of the tunnels has a different label, such as <em>R_W</em>, then it would be part of a different set of tunnels.<br>
		In the following example we can observe the occurrence of an error on activation of the controlled buffer conflicting with the bottom pin.
		</p>
      <center>
        <img src="../../../../img-libs/tunnel-demo1.gif" alt="#########">
      </center>
      <p>
	  The controlled buffer emits a floating output since its lower input is <b class="zerov">0</b>. Normally this causes the wire from the controlled buffer to be blue, but here it is bright green. This is correct, as it is connected through the tunnel to the bottom pin which is <b class="unov">1</b>. If the buffer control goes to <b class="unov">1</b>, the tunnel will carry this value to the other points and it will conflict with the <b class="unov">1</b> on the bottom pin triggering an error. Red wires (<b class="evalue">E</b>) can then be seen running through the three tunnels as in the example.
      </p>
      <h2>
        Pins
      </h2>
      <p>
        A tunnel has only one pin, whose bit width matches the tunnel's <b class="propertie">Data Bits</b> attribute. This pin is neither an input nor an output — Tunnels of the same label are simply interconnected transparently like wires.
      </p>
      <h2>
        Attributes
      </h2>
      <p>
        When the component is selected or being added, <b class="tkeybd">Alt-0</b> through <b class="tkeybd">Alt-9</b> alter its <b class="propertie">Data Bits</b> attribute and the arrow keys alter its <b class="propertie">Facing</b> attribute.
      </p>
	<div class="attliste">
	 
      <dl>
        <dt>
          <b class="propertie">Facing</b>
        </dt>
        <dd>
          The direction toward which the tunnel points.
        </dd>
        <dt>
          <b class="propertie">Data Bits</b>
        </dt>
        <dd>
          The number of bits for the tunnel.
        </dd>
        <dt>
          <b class="propertie">Label</b>
        </dt>
        <dd>
          The text within the label associated with the tunnel. This tunnel is connected to all other tunnels with exactly the same label.
        </dd>
        <dt>
          <b class="propertie">Label Font</b>
        </dt>
        <dd>
          The font with which to render the label.
        </dd>
      </dl>
	  </div>
      <h2>
        Poke Tool Behavior
      </h2>
      <p>
        None.
      </p>
      <h2>
        Text Tool Behavior
      </h2>
      <p>
        Allows the label associated with the tunnel to be edited.
      </p>
      <p>
        <b>Back to</b> <a href="../index.html">Library Reference</a>
      </p>
    </div>
  </body>
</html>
